<%@ page import="com.opensymphony.xwork2.util.ValueStack" %>
<%@ page import="examinee.ExamineeInfo" %>
<%@ page import="java.util.List" %>
<%@ page import="exam.ExamVar" %>
<%@ page import="utils.Var" %>
<%@ page import="account.AccountUtils" %>
<%@ page import="examinee.ExamineeVar" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  <title></title>
  <link href="../../skin/default/global.css" rel="stylesheet" type="text/css"/>
  <link href="../../skin/default/layout.css" rel="stylesheet" type="text/css"/>
    <style>
    html,body{overflow-x:hidden}
    </style>
  <script type="text/javascript">
    function exp(){
      parent.list.form1.action = "exportStatistic.action";
      parent.list.form1.target = "_blank";
      parent.list.form1.submit();
    }
  </script>
</head>
<%
  if (!AccountUtils.hasRight(session, Var.RIGHT_STATISTIC)) throw new Exception("deny!");
  
  ValueStack vs = (ValueStack) request.getAttribute("struts.valueStack");
  List<ExamineeInfo> elist = (List<ExamineeInfo>) vs.findValue("elist");
  int score = (Integer) vs.findValue("score");
%>
<body class="admin-content admin-panel-body">

<!--<div class="icon" id="stat"></div>-->

<!--<h1 class="title stat">发发发驾校（2009年11月05日 至 2009年11月05日）</h1>-->

<div class="admin-tablenav" style="float:right;margin-bottom:-14px;padding-right:8px;">
  <%--<button type="button" class="normal" onclick="KS.print('getScoresPrint.action?from=<%=from%>&to=<%=to%>&pxjg=<%=pxjg%>')">--%>
    <%--<span></span><img src="../../skin/default/print.gif"/>打印列表</button>--%>
  
  <button type="button" class="normal" onclick="exp()">
    <span></span><img src="../../skin/default/print.gif"/>导出Excel</button>
</div>

<!--成绩列表-->
<table cellpadding="0" cellspacing="0" class="admin-table"  style="width:98%">
  <thead>
    <tr>
      <th style="width:100px"><span class="first"></span>准考证号</th>
      <th>姓名</th>
      <th style="width:80px">成绩</th>
      <th style="width:80px;" class="last">合格/不合格</th>
    </tr>
  </thead>
  <tbody id="statlist">
    <%
      if(elist.size() == 0){
    %>
    <tr>
      <td colspan="4" class="first last">
        <div class="notice">查询结果为空</div>
      </td>
    </tr>
    <%
      }
      for(ExamineeInfo einfo : elist){
        boolean isNotTested = einfo.getScore() == -1;;
        if(score == ExamineeVar.SCORE_TESTED && isNotTested) continue;
        if(score == ExamineeVar.SOCRE_NOT_TEST && !isNotTested) continue;
    %>
    <tr>
      <td class="first"><%=einfo.getZkzh()%></td>
      <td><%=einfo.getEname()%></td>
      <td><%=isNotTested ? "未考" : String.valueOf(einfo.getScore())%></td>
      <td class="last"><%=isNotTested || einfo.getScore() < ExamVar.PASS_SCORE ? "不合格" : "合格"%></td>
    </tr>
    <%
      }
    %>
  </tbody>
</table>

<script src="../../common/jquery-1.3.2.min.js"></script>
<script src="../../common/fun.js"></script>
<script>
  var list = new KS.List("statlist")
  var list1 = new KS.List("statlist1")
</script>

</body>

</html>